import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueFullscreen from 'vue-fullscreen'

import './assets/css/global.css'
import './assets/css/global.js'
import 'ag-grid-community/dist/styles/ag-grid.css'
import 'ag-grid-community/dist/styles/ag-theme-balham.css'
import LeiHeader from '@/components/LeiHeader.vue'
import LeiSearch from '@/components/LeiSearchHeader'
import LeiBreadCrumb from '@/components/LeiBreadCrumb.vue'
import LeiButtonBar from '@/components/LeiButtonBar.vue'
import LeiPagination from '@/components/LeiPagination.vue'
import LeiSlider from '@/components/LeiSlider.vue'
import LeiFooter from '@/components/LeiFooter.vue'
import LeiTable from '@/components/LeiTable.vue'
import LeiPageFooter from '@/components/LeiPageFooter.vue'

import currencyRules from '@/utils/formCheck'
import moment from 'moment'
import common from '@/utils/common'
import { strSpace } from '@/utils/index'
Vue.prototype.$rules = currencyRules //表单验证
Vue.prototype.$strSpace = strSpace //字符串的处理
Vue.prototype.$dateFomater = common.dateFormatter //日期的处理

Vue.config.productionTip = false

Vue.use(VueFullscreen)

// element-ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

Vue.component('LeiHeader', LeiHeader)
Vue.component('LeiSearch', LeiSearch)
Vue.component('LeiBreadCrumb', LeiBreadCrumb)
Vue.component('LeiButtonBar', LeiButtonBar)
Vue.component('LeiPagination', LeiPagination)
Vue.component('LeiSlider', LeiSlider)
Vue.component('LeiFooter', LeiFooter)
Vue.component('LeiTable', LeiTable)
Vue.component('LeiPageFooter', LeiPageFooter)

// wui
// import wui from './lib/wui.js'
// Vue.use(wui)

// echarts
// import * as echarts from 'echarts';
// Vue.use(echarts)
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
Vue.prototype.$goBack = () => {
  router.app.$router.go(-1)
}
moment.locale('zh-cn') // 设置默认/全局的语言环境。
Vue.prototype.$date = moment

import xfc from '@oxoyo/xfc'
import '@oxoyo/xfc/dist/xfc.css'
Vue.prototype.$xfc = xfc

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
